package com.jg.service.impl;

import com.jg.dao.UserDao;
import com.jg.dao.impl.UserDaoImpl;
import com.jg.entity.EmployeeProfiles;
import com.jg.entity.User;
import com.jg.service.UserService;

/**
 * @author 86130
 * @version 1.0
 * @description: TODO
 * @date 2025/3/24 11:52
 */
public class UserServiceImpl implements UserService {
    UserDao userDao = new UserDaoImpl();

    // 登录
    @Override
    public User login(String username, String password) {
        return userDao.findUserByNameAndPassword(username, password);
    }

    @Override
    public int editUser(User user) {
        return userDao.editUser(user);
    }

    @Override
    public User findUserById(Integer id) {
        return userDao.findUserById(id);
    }

    @Override
    public int deleteUser(Integer id) {
        return userDao.deleteUser(id);
    }

    @Override
    public User findAll() {
        return userDao.findAll();
    }

    @Override
    public User findUserByName() {
        return userDao.findUserByName();
    }

    @Override
    public int addUser(EmployeeProfiles emp) {
        return userDao.addUser(emp);
    }
}
